package DailyPractice.Day9;

/**
 * 不使用算数运算符实现两个数的相加
 * @author lumin
 * @date 2022/04/26 19:56
 **/
public class Num1 {
    public int addAB(int A, int B) {
        int c = A ^ B;
        int d = (A & B) << 1;
        if(d == 0){
            return c;
        }else{
            return addAB(c,d);
        }
    }
}